home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-25 | 2.4 KB | 143 lines | [mlts/slnk] |
- !
- ! ARA script for connections trough
- ! a LineShare subPort.
- ! All modem-specific commands should be moved to the LineShare script.
- ! So, this ARA script is universal
- ! We assume that the LineShare script sets the modem in the
- ! "direct" connections (i.e. "\N1"), at least for our subPort.
- ! We also assume that the LineShare script reports "CONNECT XXXX" messages
- ! Our business is to adjust the serial port speed.
- ! We don't process the "^2" parameter, since it's controlled with LineShare
- !
- @ORIGINATE
- @ANSWER
- !
- ! Load Factory configurations (i.e. reset the LineShare emulator),switch off the echo
- !
- matchclr
- matchstr 1 1 "OK\13\10"
- write "AT&FE0\13"
- matchread 10
- jump 59
- !
- ! The modem is ready so enable answering, or originate a call
- !
- @LABEL 1
- matchclr
- ifAnswer 2
- note "Dialing ^1" 3
- write "ATD^1\13"
- jump 3
- @LABEL 2
- matchstr 1 3 "OK\13\10"
- write "ATS0=1\13"
- matchread 30
- jump 59
- !
- @LABEL 3
- matchclr
- matchstr 1 11 "CONNECT 1200\13\10"
- matchstr 2 12 "CONNECT 2400\13\10"
- matchstr 3 13 "CONNECT 4800\13\10"
- matchstr 4 14 "CONNECT 7200\13\10"
- matchstr 5 15 "CONNECT 9600\13\10"
- matchstr 6 16 "CONNECT 12000\13\10"
- matchstr 7 17 "CONNECT 14400\13\10"
- matchstr 8 18 "CONNECT 19200\13\10"
- matchstr 9 4 "RING\13\10"
- matchstr 10 50 "NO CARRIER\13\10"
- matchstr 11 50 "ERROR\13\10"
- matchstr 12 52 "NO DIALTONE\13\10"
- matchstr 13 53 "BUSY\13\10"
- matchstr 14 54 "NO ANSWER\13\10"
- matchread 800
- ifAnswer 2
- jump 59
- !
- @LABEL 4
- ifOriginate 3
- userhook 1
- note "Answering phone…" 2
- jump 3
- !
- @LABEL 11
- note "Communicating at 1200 bps." 2
- setspeed 1200
- jump 20
- !
- @LABEL 12
- note "Communicating at 2400 bps." 2
- setspeed 2400
- jump 20
- !
- @LABEL 13
- note "Communicating at 4800 bps." 2
- setspeed 4800
- jump 20
- !
- @LABEL 14
- note "Communicating at 7200 bps." 2
- setspeed 7200
- jump 20
- !
- @LABEL 15
- note "Communicating at 9600 bps." 2
- setspeed 9600
- jump 20
- !
- @LABEL 16
- !note "Communicating at 12000 bps." 2
- setspeed 12000
- jump 20
- !
- @LABEL 17
- note "Communicating at 14400 bps." 2
- setspeed 14400
- jump 20
- !
- @LABEL 18
- note "Communicating at 19200 bps." 2
- setspeed 19200
- jump 20
- !
- @LABEL 20
- ifANSWER 21
- pause 30
- @LABEL 21
- exit 0
- !
- ! 50: error messages
- ! No carrier
- @LABEL 50
- exit -6021
- ! No Dial Tone
- @LABEL 52
- exit -6020
- ! Busy
- @LABEL 53
- exit -6022
- ! No Answer
- @LABEL 54
- exit -6023
- ! Modem error
- @LABEL 59
- exit -6019
- !
- ! Hang up the modem
- !
- @HANGUP
- settries 0
- @LABEL 60
- DTRClear
- pause 2
- DTRSet
- write "ATZ\13"
- matchclr
- matchstr 1 62 "OK\13\10"
- matchread 30
- inctries
- iftries 3 62
- jump 60
- !
- @LABEL 62
- exit 0